﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NETMovie.UI.WebMVC.Models.MovieModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Add Movie
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsContent" runat="server">
    <script src="/Scripts/jquery/jquery-1.5.1.min.js" type="text/javascript" language="javascript"></script>
    <script src="/Scripts/jquery/jquery-ui-1.8.13.custom.min.js" type="text/javascript" language="javascript"></script>
    <link rel="Stylesheet" type="text/css" href="/Content/jquery/jquery-ui-1.8.13.custom.css" />
    <script type="text/javascript">
        $(function () {
            $(".datePicker").datepicker();
            $(".datePicker").datepicker("option", "dateFormat", "dd/mm/yy");
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Add Movie</h2>

    <p>
        Use the form below to Add a movie
    </p>

    <% using (Html.BeginForm(null, null, FormMethod.Post, new { enctype="multipart/form-data" })) { %>

        <%: Html.ValidationSummary(true, "Movie creation was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
      
                <legend>Add Movie Basic Information</legend>
               
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Title) %>
                </div>
               
                 
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Title)%>
                    <%: Html.ValidationMessageFor(m => m.Title)%>
                </div>
              
                 <div class="editor-label">
                    <%: Html.LabelFor(m => m.Summary) %>
                </div>
              
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Summary)%>
                    <%: Html.ValidationMessageFor(m => m.Summary)%>
                </div>
               
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Description)%>
                </div>
                  <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Description)%>
                    <%: Html.ValidationMessageFor(m => m.Description)%>
                </div>
              
                 <div class="editor-label">
                    <%: Html.LabelFor(m => m.ArticleUrl)%>
                </div>
                  <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.ArticleUrl)%>
                    <%: Html.ValidationMessageFor(m => m.ArticleUrl)%>
                </div>
              
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Category)%>
                </div>
                  <div class="editor-field">
                    <%: Html.DropDownListFor(m => m.Category,(IEnumerable<SelectListItem>)Session["CategoryList"], "-select one--")%>
                    <%: Html.ValidationMessageFor(m => m.Categories)%>
                </div>
               
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.isPremium)%>
                </div>
                  <div class="editor-field">
                    <%: Html.RadioButtonFor(m => m.isPremium, "true")%> Yes
                        <%: Html.RadioButtonFor(m => m.isPremium, "false")%> No
                </div>
              
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.AvailableDate)%>
                </div>
                  <div class="editor-field">

                    <%: Html.EditorFor(m => m.AvailableDate, "Date") %>
                  <%: Html.ValidationMessageFor(m => m.AvailableDate)%>
                </div>
             
                    <div class="editor-label">
                    <%: Html.LabelFor(m => m.ReleaseDate)%>
                </div>
                  <div class="editor-field">
               <%: Html.EditorFor(m => m.ReleaseDate, "Date") %>
                  <%: Html.ValidationMessageFor(m => m.ReleaseDate)%>
                </div>
               
                <div class="editor-label">

                    File Upload

                </div>
              
                <div class="editor-field">

                 <input type="file" name="fileUpload" id="fileUpload" />

                </div>
             
                <p>
                    <input type="submit" value="Add Movie" />
                </p>
               
            </fieldset>
        </div>
    <% } %>
</asp:Content>
